unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, RzButton, ExtCtrls, RzPanel;

type
  TForm1 = class(TForm)
    Tool_1: TRzToolbar;
    Btnx_1: TRzToolButton;
    Btnx_2: TRzToolButton;
    procedure Btnx_1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses
  NativeXml,Class_KzDebug;

{$R *.dfm}

procedure TForm1.Btnx_1Click(Sender: TObject);
var
  I,M:Integer;
  XMLA:TNativeXml;
  ROOT:TXmlNode;
  NODA:TXmlNode;
  NODB:TXmlNode;
begin
  try
    XMLA:=TNativeXml.Create(nil);
    XMLA.ExternalEncoding:=seAnsi;
    XMLA.LoadFromFile('project1.exe.log');
    ROOT:=XMLA.Root;

    KzDebug.FileFmt('rootname:%S',[ROOT.Name]);
    KzDebug.FileFmt('listnode:%D',[ROOT.NodeCount]);
    KzDebug.FileFmt('containercount:%D',[ROOT.ContainerCount]);

    for I:=0 to ROOT.ContainerCount-1 do
    begin
      NODA:=ROOT.Containers[I];
      KzDebug.FileFmt('noda.name:%S',[NODA.NameUnicode]);
      for  M:=0 to NODA.ContainerCount-1 do
      begin
        NODB:=NODA.Containers[M];
        KzDebug.FileFmt('nodb.name:%S',[NODB.Name]);
        //KzDebug.FileFmt('nodb.name:%S',[NODB.ValueUnicode]);
        KzDebug.FileFmt('nodb.name:%S',[NODB.Value]);
        KzDebug.FileFmt('nodb.attr:%S',[NODB.Attributes[0].Value]);
      end;
    end;
    XMLA.SaveToFile('wsdl.xml');
  finally
    FreeAndNil(XMLA);
  end;
end;

end.
